import BasicLayout from '@/layouts/basic-layout';
import Setting from '@/setting';

const pre = 'customers_';

export default {
  path: `${Setting.roterPre}/customers/`,
  name: 'customers',
  header: 'customers',
  meta: {
    // 授权标识
    auth: ['supplier-customers']
  },
  redirect: {
    name: `${pre}list`
  },
  component: BasicLayout,
  children: [
    {
      path: 'index', // 修正为相对路径 → 完整路径：/supplier/customers/index
      name: `${pre}list`, // 确保重定向指向这个name
	  meta: {
	    title: '客户资源',
	    auth: ['supplier-customers-index']
	  },
      component: () => import('@/pages/customer/customers/index') // 路径正确
    },
	{
	  path: `${Setting.roterPre}/storeCustomer/index`,
	  name: 'store_customer_direct',
	  meta: {
	    title: 'CA客户列表',
	    auth: ['supplier-store-customers-index']
	  },
	  component: () => import('@/pages/customer/storeCustomer/index')
	}
  ]
};